package com.yzmoney.wechat.model.send;

/**
 * 模板消息通用对象方法
 * 
 * 填写openId,template_id,url,topcolor等信息
 * 
 * data数据比如data中put TemplateSimpleData 对象或者list比如 first = new TempalteSimpleData("您好","#FFFFFF");
 * 
 * 
 */

import java.util.HashMap;
import java.util.Map;

/*
{
    "touser":"OPENID",
    "template_id":"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY",
    "url":"http://weixin.qq.com/download",
    "topcolor":"#FF0000",
    "data":{
            "first": {
                "value":"您好，您已成功消费。",
                "color":"#0A0A0A"
            },
            "keynote1":{
                "value":"巧克力",
                "color":"#CCCCCC"
            },
            "keynote2": {
                "value":"39.8元",
                "color":"#CCCCCC"
            },
            "keynote3":{
                "value":"2014年9月16日",
                "color":"#CCCCCC"
            },
            "remark":{
                "value":"欢迎再次购买。",
                "color":"#173177"
            }
    }
}
*/
public class TmpMsg {
	private String touser; //":"OPENID",
	private String template_id; //":"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY",
	private String url;  //":"http://weixin.qq.com/download",
	private String topcolor; //":"#FF0000",
	private Map<String, Object> data;
	
	public TmpMsg() {
		super();
		data = new HashMap<String, Object>();
	}

	public TmpMsg(String touser, String template_id, String url,
			String topcolor, Map<String, Object> data) {
		super();
		this.touser = touser;
		this.template_id = template_id;
		this.url = url;
		this.topcolor = topcolor;
		this.data = data;
	}

	public TmpMsg(String touser, String template_id, String url,
			String topcolor) {
		super();
		this.touser = touser;
		this.template_id = template_id;
		this.url = url;
		this.topcolor = topcolor;
		this.data = new HashMap<String, Object>();
	}
	
	public String getTouser() {
		return touser;
	}

	public void setTouser(String touser) {
		this.touser = touser;
	}
	
	public String getTemplate_id() {
		return template_id;
	}

	public void setTemplate_id(String template_id) {
		this.template_id = template_id;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getTopcolor() {
		return topcolor;
	}

	public void setTopcolor(String topcolor) {
		this.topcolor = topcolor;
	}

	public Map<String, Object> getData() {
		return data;
	}

	public void setData(Map<String, Object> data) {
		this.data = data;
	}

}
